package com.zdgcc.site.persistence;

import java.sql.Connection;

import com.zdgcc.site.db.DBUtil;
import com.zdgcc.site.domain.Member;

public class LoginMapper {

	public Member login(String name){
		String sql = "SELECT MEMBER_PWD FROM TECH_T_MEMBER_BASE WHERE MEMBER_NAME = '"+name+"'";
		Member member = new Member();
		Connection conn = null;
		try {
			conn = DBUtil.getConnection();
			member = (Member) DBUtil.getObject(Member.class, conn, sql);
		} catch (Exception e) {
			e.printStackTrace();
		}finally{
			try {
				DBUtil.closeConnection(conn);
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
		return member;
	}
	
}
